<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 00:33:05
 * @LastEditTime: 2023-09-16 12:19:17
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description: 
 */

namespace App\Models;

use App\Traits\CommonUserTrait;

class FinanceAmountoddType extends BaseModel
    {
    use CommonUserTrait;
    public $timestamps = true;
    public $table = "sys_finance_amountodd_type";
    protected $guarded = [];

    protected $casts = [];

    public function customer_subject()
        {
        return $this->belongsTo(Subject::class);
        }
    public function supplier_subject()
        {
        return $this->belongsTo(Subject::class);
        }
    public function status()
        {
        return $this->belongsTo(Dic::class, "status_id", "key")->where(function ($q)
            {
            $q->where("code", 'table_status');
            });
        }
    }
